package com.bot.rf.entity;

/**
 * @program: report-form-demo
 * @description: 图书实体类
 * @author: zyy
 * @create: 2021-02-25 11:08
 **/
public class BookInfo implements Comparable {

    /** tag标签id */
    private String tagId;

    /** 索书号 */
    private String bookIndex;

    /** 条形码 */
    private String barcode;

    /** 书名 */
    private String bookName;

    /** 馆藏地 */
    private String currentLibrary;

    /** 盘点的层架标 */
    private BookLocation location;

    /** 数据库里的层架标 */
    private BookLocation rightLocation;

    /** 馆藏状态 */
    private BookStatus bookStatus;

    /** 是否是错架图书 */
    private boolean error = false;

    /** 是否是异常图书 */
    private boolean abnormal = false;

    /** 更新时间 */
    private String updateTime;
    private String processType;
    private String floorNumber;
    private String temporaryLocationName;

    public String getTagId() {
        return tagId;
    }

    public void setTagId(String tagId) {
        this.tagId = tagId;
    }

    public String getBookIndex() {
        return bookIndex;
    }

    public void setBookIndex(String bookIndex) {
        this.bookIndex = bookIndex;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getCurrentLibrary() {
        return currentLibrary;
    }

    public void setCurrentLibrary(String currentLibrary) {
        this.currentLibrary = currentLibrary;
    }

    public BookLocation getLocation() {
        return location;
    }

    public void setLocation(BookLocation location) {
        this.location = location;
    }

    public BookLocation getRightLocation() {
        return rightLocation;
    }

    public void setRightLocation(BookLocation rightLocation) {
        this.rightLocation = rightLocation;
    }

    public BookStatus getBookStatus() {
        return bookStatus;
    }

    public void setBookStatus(BookStatus bookStatus) {
        this.bookStatus = bookStatus;
    }

    public boolean isError() {
        return error;
    }

    public void setError(boolean error) {
        this.error = error;
    }

    public boolean isAbnormal() {
        return abnormal;
    }

    public void setAbnormal(boolean abnormal) {
        this.abnormal = abnormal;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getProcessType() {
        return processType;
    }

    public void setProcessType(String processType) {
        this.processType = processType;
    }

    public String getFloorNumber() {
        return floorNumber;
    }

    public void setFloorNumber(String floorNumber) {
        this.floorNumber = floorNumber;
    }

    public String getTemporaryLocationName() {
        return temporaryLocationName;
    }

    public void setTemporaryLocationName(String temporaryLocationName) {
        this.temporaryLocationName = temporaryLocationName;
    }

    public BookInfo() {
    }

    public BookInfo(String tagId, String barcode, String bookIndex, String bookName) {
        this.tagId = tagId;
        this.bookIndex = bookIndex;
        this.bookName = bookName;
        this.barcode = barcode;
    }

    @Override
    public int compareTo(Object o) {
        BookInfo b2 = (BookInfo) o;
        if (this.bookIndex == null) {
            return -1;
        } else if (b2.bookIndex == null) {
            return 1;
        }
        return this.bookIndex.compareTo(b2.bookIndex);
    }

    @Override
    public String toString() {
        return tagId + " " + barcode + " " + bookIndex + " " + bookName +" " + currentLibrary;
    }
}
